home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 22
/
Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso
/
Aminet
/
biz
/
dopus
/
MPEGA_GUIplay.lha
/
MPEGA-Play.dopus5
< prev
Wrap
Text File
|
1997-09-27
|
4KB
|
170 lines
/* $VER: MPEGA-Play.dopus5 1.6 (26 Sep 1997)
©1997 by mike@kily.ruhr.de (http://kily.home.pages.de)
DOPUS5.5+ AREXX Script for MPEG-Soundplaying
with ProgressBarGui via MPEGA SoundPlayer
needs:
DOPUS 5.5+
MPEGA 3.3
TBreak > Aminet:util/cli/TBreak.lha for play abort function.
description:
A DOPUS GUI for the Great MPEGA player by Stephane TAVENARD.
displays Name/MPEG-Quality/Time in a DOPUS PROGRESS Window.
it shows the runtime on a proggressbar and a timecounter.
installation:
as Button,Menu,...
NO Parameters, only select: <AREXX> Dopus5:ARexx/MPEGA-Play.dopus5
If you want to use this script from multiply OPUS add the DOPUS Port:
<AREXX> Dopus5:ARexx/MPEGA-Play.dopus5 {Qp}
For Filetype-startup (dobbleclick start) install it as:
<AREXX> Dopus5:ARexx/MPEGA-Play.dopus5 {Qp} {Ql} {o}
usage:
select all .mp files and start MPEG-play.
if you want to skip a sound a file press the abort button.
to abort the complete script abort two soundplayings in the first 5 secs.
configuration:
check/change the mpega startup parameters in this script.
to change the abort time change "stop<5 & secs<5" in this script.
bugs:
if MPEGA needs too much CPU-Power then the time display is too slow/wrong.
solution: get a faster CPU.
EmailWare:
this script ist Email-ware,
please mail me your favourit MP3 Internet-Site !
*/
PARSE ARG portname handle file .
IF portname='' THEN portname='DOPUS.1'
ADDRESS VALUE portname
OPTIONS RESULTS
IF handle="" THEN DO
LISTER QUERY SOURCE
handle=result
IF RC~=0 THEN DO
DOPUS REQUEST '"no Source-directory selected !?!" OOPS!'
EXIT
END
LISTER QUERY Handle selfiles stem files.
IF files.count=0 THEN DO
DOPUS REQUEST '"no MPEG sound-files selected !?!" OOPS!'
EXIT
END
END
IF file~="" then DO
files.0=compress(file,'"')
files.count=1
END
LISTER QUERY Handle path
pfad=result
LISTER SET Handle BUSY ON
LISTER SET Handle newprogress name info bar abort
DO j = 0 TO files.count-1
IF index(upper(files.j),".MP") >1 then do
LISTER SET Handle NEWPROGRESS NAME "MPEGA-dopus5-GUI by mike@kily.ruhr.de"
LISTER SET Handle NEWPROGRESS INFO "Time: 00:00 / 00:00 / Name: "files.j
LISTER SET Handle NEWPROGRESS bar 10 0
file='"'pfad||files.j'"'
ADDRESS COMMAND 'RUN >NIL: mpega <nil: -d2 -q2 -v120 -T 'file' >PIPE:mpegout'
CALL Open('mpegout','PIPE:mpegout','r')
string = ReadLn('mpegout')
string=Text( string )
parse var string version "[680"CPU "(C)"dummy
version=version" "CPU
LISTER SET Handle NEWPROGRESS title j+1' / 'files.count' - 'version
DO until dummy=""
dummy = ReadLn('mpegout')
END
string = ReadLn('mpegout')
string=Text( string )
parse var string dummy"MPEG"MTYPE
string="MPEG"MTYPE
LISTER SET Handle NEWPROGRESS NAME string
string = ReadLn('mpegout')
string=Text( string )
parse var string dummy": "pm":"ps
ptotal=pm*60+ps
secs=0
LISTER SET Handle NEWPROGRESS bar ptotal 0
DO UNTIL Eof('mpegout')
time=ReadCh('mpegout',29)
time=left(right(time,10),5)
secs=secs+1
if time="" then time=" End."
LISTER QUERY Handle abort
IF RESULT THEN DO
ADDRESS COMMAND 'TBREAK MPEGA >nil:'
if stop<5 & secs<5 then do
LISTER REFRESH Handle
LISTER SET Handle BUSY OFF
CALL Close('mpegout')
EXIT
end
stop=secs
END
ELSE DO
LISTER SET Handle NEWPROGRESS INFO 'Time: 'pm":"ps" / "time" / Name: "files.j
LISTER SET Handle NEWPROGRESS bar ptotal secs
END
END
LISTER CLEAR Handle abort
CALL Close('mpegout')
LISTER SELECT Handle files.j OFF
LISTER REFRESH Handle
END
END
LISTER SET Handle BUSY OFF
EXIT
TEXT:
PROCEDURE
TEXT=Arg( 1 )
esc2=1
do until esc1=0
esc1=Verify(text,'1b'x,'m')
if esc1~=0 then text=delstr(text,esc1,1)
parse var text d1'[1m'd2'[22m'd3
text=d1||d2||d3
end
RETURN TEXT